<extend file="resource/view/home">
	<block name="content">
		<div class="MyOrder_main">
			<div class="main_classification">
				<a href="{{u('entry.index')}}">首页</a><span>/</span>
				<span>我的订单</span>

			</div>
			<div class="MyOrder_main_left">
				<div class="MyOrder_main_left_title">
					<a href="">我的商城</a>
				</div>

				<div class="MyOrder_main_left_content">
					<ul>
						<li>
							<h3>
								<p></p>
								<span>订单中心</span>

							</h3>
							<ol>
								<li>
									<a href="">我的订单</a>
								</li>
							</ol>

						</li>

					</ul>
				</div>

			</div>
			<div class="MyOrder_main_right">
				<div class="MyOrder_main_right_title">
					<div class="tl">
						<h2>我的订单</h2>
					</div>
					<div class="tr">
						<ul>
							<li><a href="">最近三个月订单</a></li>
							<li><a href="">三个月前订单</a></li>
						</ul>
					</div>
				</div>
				<div class="MyOrder_main_right_header">
					<ul>
<!--						<li><a href="" class="color">全部</a></li>-->
<!--						<li><a href="" >待支付</a></li>-->
<!--						<li><a href="" >待收货</a></li>-->
<!--						<li><a href="" >已完成</a></li>-->
					</ul>
				</div>

				<!--商品列表头部商品单价-->
				<div class="list-group-title">
					<table border="0" cellspacing="0" cellpadding="0">
						<tr>
							<th width="501">商品|</th>
							<th width="114">单价/元|</th>
							<th width="75">数量|</th>
							<th width="114">实付款/元|</th>
							<th width="138">订单状态及操作</th>

						</tr>

					</table>
				</div>
				<foreach from="$orderData" key="$k" value="$v">


				<div class="list-group-time">

					<ul>

						<li> {{date('Y-m-d H:i:s',$v['date'])}} <span>订单号：</span> <a href="">{{$v['onumber']}}</a>	</li>
						<li class="abolish">{{$v['orderState']}}</li>
					</ul>
				</div>
				<div class="list-group-content">
					<table border="0" cellspacing="" cellpadding="">
						<foreach from="$v['list']" key="$kk" value="$vv">
						<tr >

							<td colspan="2">
								<a href="{{u('show.index',['gid'=>$vv['gid']])}}"><img src="{{$vv['gpic']}}"/></a>

							</td>
							<td class="textP">
								<p>{{$vv['gname']}} {{$vv['describe']}}</p>

							</td>
							<td class="money">
								<em>￥</em>
								<span>{{$vv['subtotal']}}</span>
							</td>
							<td class="count">

								<span>{{$vv['quantity']}}</span>
							</td>
							<td class="allMoney" rowspan="{{count($v['list'])}}">
								<em>￥</em>
								<span>{{$v['total']}}</span>
							</td>
							<td class="caozuo" rowspan="{{count($v['list'])}}" >

								<a href="{{u('myCar.successOrder',['oid'=>$v['oid']])}}" style="color:blue;">立即支付</a><br/>
								<a href="{{u('delOrder',['oid'=>$v['oid']])}}" style="color:blue;">取消订单</a><br/>
							</td>
						</tr>
						</foreach>

					</table>
				</div>
				</foreach>
			</div>
			<script>
				$(function(){
//					alert($('.list-group-content table').find('tr').index());
					$.each($('table tr'),function(){
						if($(this).index()>0){
//							alert($(this).index())
							$(this).find('td').eq(4).remove()
							$(this).find('td').eq(4).remove()
						}
					})
//					$('table tr:nth-child(2) td').eq(4).remove()
//					$('table tr:nth-child(2) td').eq(4).remove()
//					$('table tr:nth-child(2)').css('background','red')
//					alert($('table tr:nth-child(2) td').eq(4).html())
				})
			</script>
		</div>
	</block>